<?php 
namespace Common\Model;
use Think\Model\RelationModel;
class YgclLessonModel extends RelationModel{
	protected $_link = array(
			'class'=>array(
					'mapping_type'=>self::BELONGS_TO,
					'class_name'  =>'YgclClass',
					'foreign_key'=>'cid',
					'as_fields'=>'title:class',
			),
			'classtype'=>array(
					'mapping_type'=>self::BELONGS_TO,
					'class_name'  =>'YgclClassType',
					'foreign_key'=>'lessontype',
					//'as_fields'=>'title:classtype',
			),
			'classinfo'=>array(
					'mapping_type'=>self::BELONGS_TO,
					'class_name'  =>'YgclClass',
					'foreign_key'=>'cid',
					//'as_fields'=>'title:class',
			),
	);
}
?>